We use it in the secure memory allocator, if it's available.
/* Define to 1 if you have the `mkstemp' function. */
#mesondefine HAVE_MKSTEMP
+/* Define to 1 if you have the `mlock` function. */
+#mesondefine HAVE_MLOCK
+
/* Define to 1 if you have a working `mmap' system call. */
#mesondefine HAVE_MMAP
cdata.set('HAVE_UINT128_T', 1)
endif
+# Check for mlock
+if cc.has_function('mlock', prefix: '#include <sys/mman.h>')
+ cdata.set('HAVE_MLOCK', 1)
+endif
+
# Disable deprecation checks for all libraries we depend on on stable branches.
# This is so newer versions of those libraries don't cause more warnings with
# a stable GTK version.